package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Visit;
import com.zzyl.vo.TimeCountVo;
import com.zzyl.vo.VisitVo;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @Description ReservationMapper
 * @Author apeng
 * @Date 2024-10-21
 */
@Mapper
public interface ReservationMapper {


    void insert(Visit visit);

   //查询取消预约数

    List<TimeCountVo> getCountByTime(String time);

    Page<VisitVo> page(Integer status);

    @Update("update reservation set status = 2 where id = #{id}")
    void cancel(Long id);

    Integer selectCancelledCount(Long id, String currentDay);


    Integer getPhone( @Param("time") String time, @Param("mobile") String mobile);



    @Update("update reservation set status = 2 where id = #{id}")
    void update(Long id);

    List<Visit> selectVisitById(Long id);
}
